{extend name="base" /}
{block name="css"}
<link rel="stylesheet" href="__JS__/jeDate/skin/jedate.css">
{/block}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/classes/index')}">班级管理</a></li>
            <li class=""><a href="{:url('admin/classes/add')}">添加文章</a></li>
            <li class="layui-this">编辑班级</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/classes/edit')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">班级名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="class_name" value="{$class.class_name}" required  lay-verify="required"
                               maxlength="30"  placeholder="请输入名称" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开班时间</label>
                        <div class="layui-input-block">
                            <div class="jeinpbox">
                                <input type="text" name="start_date" value="{$class.start_date}" class="jeinput layui-input" id="start_date"
                                     readonly  lay-verify="required" placeholder="请选择时间">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">结课时间</label>
                        <div class="layui-input-block">
                            <div class="jeinpbox">
                                <input type="text" name="end_date" value="{$class.end_date}" class="jeinput layui-input" id="end_date"
                                      readonly lay-verify="required" placeholder="请选择时间">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">最大人数</label>
                        <div class="layui-input-block">
                            <input type="text" name="max_person" value="{$class.max_person}" required  lay-verify="required|number"
                                maxlength="10" oninput="this.value = this.value.replace(/\D/g, '')" placeholder="请输入人数" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <textarea name="remark" placeholder="（选填）请输入备注" maxlength="200" class="layui-textarea">{$class.remark}</textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$class.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script src="__JS__/jeDate/dist/jedate.min.js"></script>
{/block}
{block name="script"}
<script>
    jeDate("#start_date",{
        format: "YYYY-MM-DD"
    });
    jeDate("#end_date",{
        format: "YYYY-MM-DD"
    });
</script>
{/block}
